package main

import (
	"fmt"
)

func main() {
	//这里打印的值是5或6
	fmt.Println(getNumber())
}

func getNumber() int {
	//go的局部变量会被别的goroutine修改
	var i int = 5
	go func() {
		i = 6
	}()
	for i := 0; i < 100000; i++ {
		//模拟计算过程
	}
	return i
}
